import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/',
        redirect: '/login'
    },
    {
    	path: '/readme',
        component: resolve => require(['../components/common/Home.vue'], resolve),
        children:[
            {
                path: '/',
                component: resolve => require(['../components/page/Readme.vue'], resolve)
            },
            {
                path: '/basetable',
                component: resolve => require(['../components/page/Basetable.vue'], resolve)  
            },
            {
                path: '/vuetable',
                component: resolve => require(['../components/page/VueTable.vue'], resolve)  
            },
            {
                path: '/basecharts',
                component: resolve => require(['../components/page/BaseCharts.vue'], resolve)  
            },
            {
                path: '/drag',
                component: resolve => require(['../components/page/DragList.vue'], resolve)    // 拖拽列表组件
            },
            {
                path: '/markdown',
                component: resolve => require(['../components/page/Markdown.vue'], resolve)     // Vue-Quill-Editor组件
            },
            {
                path: '/baseform',
                component: resolve => require(['../components/page/BaseForm.vue'], resolve)
            },
            {
                path: '/upload',
                component: resolve => require(['../components/page/Upload.vue'], resolve)       // Vue-Core-Image-Upload组件
            },
            {
                path: '/vueeditor',
                component: resolve => require(['../components/page/VueEditor.vue'], resolve)
            },
            {
                path: '/demo01',
                component: resolve => require(['../components/demo/Demo01.vue'], resolve)
            },
            {
                path: '/demo02',
                component: resolve => require(['../components/demo/Demo02.vue'], resolve)
            },
            {
                path: '/imgUpload',
                component: resolve => require(['../components/demo/ImgUpload.vue'], resolve)
            }
        ]
    },
    {
    	path: '/login',
        component: resolve => require(['../components/page/Login.vue'], resolve)
    }
  ]
})
